# coding=utf-8
import D2Ext


class CCommon(object):

    @staticmethod
    def GetDefense(ptItem):
        return D2Ext.Common_Common_GetDefense(ptItem)

    @staticmethod
    def SetItemPage(ptItem, page):
        return D2Ext.Common_Common_SetItemPage(ptItem, page)

    @staticmethod
    def GetItemPage(ptItem):
        return D2Ext.Common_GetItemPage(ptItem)

    @staticmethod
    def GetClassSkillID(nClass, nPosition):
        return D2Ext.Common_GetClassSkillID(nClass, nPosition)

    @staticmethod
    def InventoryAddToContainer(ptInventory, ptItem):
        return D2Ext.Common_InventoryAddToContainer(ptInventory, ptItem)

    @staticmethod
    def RoomIsTown(ptRoom):
        return D2Ext.Common_RoomIsTown(ptRoom)

    @staticmethod
    def GetItemType(nItemHcIdx):
        return D2Ext.Common_GetItemType(nItemHcIdx)

    @staticmethod
    def GetItemLevel(ptItem):
        return D2Ext.Common_GetItemLevel(ptItem)

    @staticmethod
    def GetItemQuality(ptItem):
        return D2Ext.Common_GetItemQuality(ptItem)

    @staticmethod
    def SetUnitStat(ptStatList, StatID, Value, Param):
        return D2Ext.Common_SetUnitStat(ptStatList, StatID, Value, Param)

    @staticmethod
    def GetStatsFromListflag(ptItem, Listflag):
        return D2Ext.Common_GetStatsFromListflag(ptItem, Listflag)

    @staticmethod
    def GetSkillLevel(ptUnit, ptSkill, bTotal):
        return D2Ext.Common_GetSkillLevel(ptUnit, ptSkill, bTotal)

    @staticmethod
    def GetDifficultyLevelsBIN(difficultyLevel):
        return D2Ext.Common_GetDifficultyLevelsBIN(difficultyLevel)

    @staticmethod
    def GetRoomFromUnit(ptUnit):
        return D2Ext.Common_GetRoomFromUnit(ptUnit)

    @staticmethod
    def UpdateRoomFlags(ptRoom, unk):
        return D2Ext.Common_UpdateRoomFlags(ptRoom, unk)

    @staticmethod
    def GetItemSockets(ptItem):
        return D2Ext.Common_GetItemSockets(ptItem)

    @staticmethod
    def GetBodyloc(ptItem):
        return D2Ext.Common_GetBodyloc(ptItem)

    @staticmethod
    def UpdateSkills(ptUnit):
        return D2Ext.Common_UpdateSkills(ptUnit)

    @staticmethod
    def EvalItemCalc(ptPlayer, ptItem, dwCalc):
        return D2Ext.Common_EvalItemCalc(ptPlayer, ptItem, dwCalc)

    @staticmethod
    def GetActFromLevel(nLevel):
        return D2Ext.Common_GetActFromLevel(nLevel)

    @staticmethod
    def GetFirstInventoryItem(ptInventory):
        return D2Ext.Common_GetFirstInventoryItem(ptInventory)

    @staticmethod
    def GetNextInventoryItem(ptLastItem):
        return D2Ext.Common_GetNextInventoryItem(ptLastItem)

    @staticmethod
    def GetUnitState(ptUnit, StateID):
        return D2Ext.Common_GetUnitState(ptUnit, StateID)

    @staticmethod
    def AddUnitStat(ptUnit, StatID, Value, Param):
        return D2Ext.Common_AddUnitStat(ptUnit, StatID, Value, Param)

    @staticmethod
    def GetUnitBaseStat(ptUnit, StatID, Param):
        return D2Ext.Common_GetUnitBaseStat(ptUnit, StatID, Param)

    @staticmethod
    def GetUniqueID(ptItem):
        return D2Ext.Common_GetUniqueID(ptItem)

    @staticmethod
    def GetSkill(ptPlayer, nSkillID):
        return D2Ext.Common_GetSkill(ptPlayer, nSkillID)

    @staticmethod
    def InvRemoveItem(ptInventory, ptItem):
        return D2Ext.Common_InvRemoveItem(ptInventory, ptItem)

    @staticmethod
    def GetItemTxt(ItemId):
        return D2Ext.Common_GetItemTxt(ItemId)

    @staticmethod
    def GetItemIndexFromCode(ItemCode):
        return D2Ext.Common_GetItemIndexFromCode(ItemCode)

    @staticmethod
    def GetLevelNoFromRoom(ptRoom):
        return D2Ext.Common_GetLevelNoFromRoom(ptRoom)

    @staticmethod
    def SetUnitStat2(ptUnit, nStat, nValue, nLayer):
        return D2Ext.Common_SetUnitStat2(ptUnit, nStat, nValue, nLayer)

    @staticmethod
    def GetRunesBinData(ptItem):
        return D2Ext.Common_GetRunesBinData(ptItem)

    @staticmethod
    def GetPlayerData(ptChar):
        return D2Ext.Common_GetPlayerData(ptChar)

    @staticmethod
    def GetUnitStat(ptUnit, StatID, Param):
        return D2Ext.Common_GetUnitStat(ptUnit, StatID, Param)

    @staticmethod
    def GetCursorItem(ptInventory):
        return D2Ext.Common_GetCursorItem(ptInventory)

    @staticmethod
    def InvAddItem(ptInventory, ptItem, posX, posY, vValueC, bIsClient, page):
        return D2Ext.Common_InvAddItem(ptInventory, ptItem, posX, posY, vValueC, bIsClient, page)

    @staticmethod
    def GetClassSkillCount(nClass):
        return D2Ext.Common_GetClassSkillCount(nClass)

    @staticmethod
    def GetItemByBodyLoc(ptInventory, bodyloc):
        return D2Ext.Common_GetItemByBodyLoc(ptInventory, bodyloc)

    @staticmethod
    def UnitIsItem(ptItem):
        return D2Ext.Common_UnitIsItem(ptItem)

    @staticmethod
    def GetCharStatsBIN(dwIdx):
        return D2Ext.Common_GetCharStatsBIN(dwIdx)

    @staticmethod
    def GetItemStatCostBIN(dwIdx):
        return D2Ext.Common_GetItemStatCostBIN(dwIdx)

    @staticmethod
    def GetLevelTxt(dwIdx):
        return D2Ext.Common_GetLevelTxt(dwIdx)

    @staticmethod
    def GetSkillsTxt(dwIdx):
        return D2Ext.Common_GetSkillsTxt(dwIdx)

    @staticmethod
    def GetItemTypeBin(dwIdx):
        return D2Ext.Common_GetItemTypeBin(dwIdx)

    @staticmethod
    def GetInventoryTxt(dwIdx):
        return D2Ext.Common_GetInventoryTxt(dwIdx)

    @staticmethod
    def GetSgptDataTables():
        return D2Ext.Common_GetSgptDataTables()

    @staticmethod
    def GetStatValue(ptUnit, StatID, Param):
        return D2Ext.Common_GetStatValue(ptUnit, StatID, Param)

    @staticmethod
    def SetStatValue(ptUnit, StatID, Value, Param):
        return D2Ext.Common_SetStatValue(ptUnit, StatID, Value, Param)

    @staticmethod
    def GetStatEx(ptUnit, isc_id):
        return D2Ext.Common_GetStatEx(ptUnit, isc_id)

    @staticmethod
    def RefreshItem(ptPlayer, ptItem):
        return D2Ext.Common_RefreshItem(ptPlayer, ptItem)

    @staticmethod
    def SetItemFlag(ptItem, dwFlag, HowSet):
        return D2Ext.Common_SetItemFlag(ptItem, dwFlag, HowSet)

    @staticmethod
    def GetPersonalName(ptItem):
        return D2Ext.Common_GetPersonalName(ptItem)

    @staticmethod
    def SetPersonalName(ptItem, szName):
        return D2Ext.Common_SetPersonalName(ptItem, szName)

    @staticmethod
    def AddToContainer(ptInventory, ptItem):
        return D2Ext.Common_AddToContainer(ptInventory, ptItem)

    @staticmethod
    def SetBeginFlag(ptPlayer, nHowSet):
        return D2Ext.Common_SetBeginFlag(ptPlayer, nHowSet)

    @staticmethod
    def SetItemPrefix(ptItem, dwTxtRow, dwPrefixNum):
        return D2Ext.Common_SetItemPrefix(ptItem, dwTxtRow, dwPrefixNum)

    @staticmethod
    def SetItemSuffix(ptItem, dwTxtRow, dwSuffixNum):
        return D2Ext.Common_SetItemSuffix(ptItem, dwTxtRow, dwSuffixNum)

    @staticmethod
    def SetItemQuality(ptPlayer, quality):
        return D2Ext.Common_SetItemQuality(ptPlayer, quality)

